import type {Component} from 'vue';
import type {NoticeBizType} from './type';

import MsgPushNotice from './MsgPushNotice.vue'

const componentMap = new Map<NoticeBizType, Component>();

componentMap.set('test', MsgPushNotice)

// 可以添加自定义的通知组件
// componentMap.set('other', MsgPushNoticeOther)

export function add(bizType: NoticeBizType, component: Component) {
  componentMap.set(bizType, component);
}

export function del(bizType: NoticeBizType) {
  componentMap.delete(bizType);
}

export { componentMap };
